<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="java.util.*" %>
<%@ page import="java.text.*"%> 
<%@ page 
	import="com.opensymphony.xwork2.ActionContext" 
	import="java.util.Map" %> 
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <script type="text/javascript" src="js/jquery-easyui-1.4.2/jquery.min.js"></script>
  <script type="text/javascript" src="js/jquery-easyui-1.4.2/jquery.easyui.min.js" charset="utf-8"></script>
  <script type="text/javascript" src="js/jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script></head>
  <link rel="stylesheet" href="js/jquery-easyui-1.4.2/themes/default/easyui.css" type="text/css"></link>
  <link rel="stylesheet" href="js/jquery-easyui-1.4.2/themes/icon.css" type="text/css"></link>
  
  
<title></title>
</head>
<script src="js/saleorder.js"></script>
<script src="js/js-utils/utils.js"></script>
<%
String datetime=new SimpleDateFormat("yyyy-MM-dd-mm").format(Calendar.getInstance().getTime()); %>
<%
String saleorderid=new SimpleDateFormat("yyyyMMdd-mmss").format(Calendar.getInstance().getTime());
   
     %> 
	
	<!-- java代码 -->
<script language="javascript">alert(totalmoney);</script>
<body>
   
   
    
   <!-- =============================1.开单信息============================================= -->
   
    <!-- ==========================显示开单信息================= -->
    <div class="easyui-panel" border="false" id="panel1" closed="true">
        <fieldset style="border-color:#c3d8fa">
        <legend>开单信息</legend>
        <tr>
                      <s:set name="employee" value="#session['employee']" />
   
                      <th>订单信息     操作员:</th>
                      <td>
                         <input type="text" name="input1" style="background:transparent; border:none;" value="<s:property value="#employee.name"/>" readonly="true">
                      </td>
                      <th>权限：</th>
                      <td>
                         <input type="text" name="input1" style="background:transparent; border:none;" value="<s:property value="#employee.perssion"/>" readonly="true">
                      </td>
                      <th>订单号：</th>
                      <td>
                         <input type="text" name="input1" style="background:transparent; border:none;" value="<%=saleorderid%>" readonly="true">
                      </td>
                   <!--  <th>创建时间：</th>
                      <td>
                         <input type="text" name="input1" style="background:transparent; border:none;" value="<%=datetime%>" readonly="true">
                      </td>
                      -->   
                      <th>顾客ID：</th>
                      <td>
                         <input type="text" name="input1" style="background:transparent; border:none;" value="1" readonly="true">
                      </td>
                     
         </tr>
         </fieldset>
         
    </div>
  
   
   <!-- =============================2.录入商品============================================= -->
     <div class="easyui-layout" style="width:600px;height:400px;" fit="true">
         <!-- ======================2.1销售开单==================== -->
           <div region="north" height="138px" title="商品计算"  style="overflow:hidden;" id="test"> 
           
           <form id="form_saleorder" class="easyui-form" method="post">
          <table>
        
           <tr>
                      <th>顾客ID:</th>
                      <td>
                         <input name="customerid"  style="width:140">
                      </td>
                     
                      <td><a id="makeorderbutton" class="easyui-linkbutton"  onClick="createorder()">创建订单</a></td>
                        
                    
            </tr>
            
            </table>
          </form>   
              <!-- ======================2.2.录入商品==================== -->
            <form  id="form_saleorderitem" >
             <table>
                   <tr>
                      <th>商品编号:</th>
                      <td>
                         <input name="productid"  disabled="true">
                      </td>
                      <th>数量:</th>
                      <td>
                         <input name="quantity"   disabled="true">
                      </td>
                      
                      <td><a id="additem"  class="easyui-linkbutton"  onClick="createorderitem()" disabled="true">录入商品</a>
                    
                      </td>
                      
              </tr>
                       
             </table> </form>
             <!-- ======================3.11显示总金额======================== -->
             <div id="amout" style="float:left"> 
                 <form id="amout">
                <span style="font-size:40px;color:red;">总金额：<input name="total" type="text"  editable="false" readonly="true" style="width:200px;height:36px;font-size:40px;border:none;" value="0"></input>
                  <a class="easyui-linkbutton"  onClick="quitsale()">挂账</a>
                  <a class="easyui-linkbutton"  onClick="scrollbottom()">结算</a>
                  
                  
                </span>
                
                <!-- ====================3.2结算==================== -->  
                 <div class="easyui-panel" height="60px" width="1800px" style="font-size:40px;color:green;border:false">
                 
               
                <tr>
                     
                      <th>支付方式:</th>
                      <td>
                         <input class="easyui-combobox" name="paytype" height="40px"  style="height:34px;" data-options="
		valueField: 'label',
		textField: 'value',
		data: [{
			label: 'money',
			value: '现金支付'
		},{
			label: 'money',
			value: '现金支付'
		},{
			label: 'money',
			value: '现金支付'
		}]" />


                      </td>
                      <th>实收款：</th>
                      <td>
                         <input type="text" name="paymoney" style="font-size:40px;width:120px;height:34px;" >
                      </td>
                      <th> 找零</th>
                      <td>
                         <input type="text" name="retailmoney" style="background:transparent; font-size:40px;border:none;width:120px;">
                      </td>
                       <td><a class="easyui-linkbutton"  onClick="endsale()">确定结账</a></td>
         </tr><form> 
                 
                 
                 </div>  
             </div>
          </div>
          <!-- ======================3.2显示条目=========== -->
                       <div region="center">
                           <table id="grid_saleorderitem"></table>
                       </div>
                       
                  
   
 
        
         
  </div>
</body>
</html>


